Presentation is loading. Please wait.

Presentation is loading. Please wait.

A (Very) Short Introduction to Model-Driven Development (MDD)

Similar presentations


Presentation on theme: "A (Very) Short Introduction to Model-Driven Development (MDD)"— Presentation transcript:

1 A (Very) Short Introduction to Model-Driven Development (MDD)
(MDD ~ Model-Driven Engineering (MDE))

2 Content Some background info What is a model? Types of modellers
UML and MDD (MDA) Modelling Maturity levels

3

4 From Wikipedia, the free encyclopedia on MDE:
…on the use of software modeling as a primary form of expression... With the introduction of UML, MDE has become very popular today with a wide body of practitioners and supporting tools...

5 Copied From: Model-Driven Semantic Web Engineering
Dragan Gašević and Gerd Wagner

6 Copied from: Educating in MDE by Jordi Cabot 

7 Copied from: Model-Driven Software Engineering in Practice Marco Brambilla, Jordi Cabot, Manuel Wimmer

8 Copied from: Model-Driven Software Engineering in Practice Marco Brambilla,
Jordi Cabot, Manuel Wimmer

9 Content Some background info What is a model? Types of modellers
UML and MDD (MDA) Modelling Maturity levels

10 Features of a Model A model according to Stachowiak exhibits the following features: Mapping feature A model is based on an original (there is a subject). Reduction feature A model only reflects a (relevant) selection of an original's properties. Pragmatic feature A model needs to be usable (in place of an original) with respect to some purpose. The pragmatic feature means that there is some purpose with the model.

11 subject (what is being modelled)
[1]: “all meaning is mapping-mediated, which is to say, all meaning comes from analogies.” Math terms: A homomorphism is a structure-preserving map from one structure to another. structure X structure Y 1 A D B 2 E “Something” can only be Modelled with Analogy I relation to nature mostly homomorphism is appearing and not Isomorphism . Isomorphism is when there is a homomorphic mapping both ways - in a sense isomorphic structures are structurally identical. 3 C model subject (what is being modelled)

12 + = I would say: All meaning comes from analogies and composition.
Hair extensions for horses! oryx

13 Most models found in software engineering are specification models (prescriptive models) and typically the "original" does not exist when the model is created Doing reverse engineering is like making a descriptive model (descriptive models are the most common models in natural science).

14 Specification Models Guides us in constructing a system. The model is like a blueprint – high complexity requires good modelling techniques. Models may help us visualize a system at different levels of abstraction, this makes it easier to manage complexity and to understand the system. Models give us a template that guides us in constructing a system.

15 Why Modelling? High level of abstraction gives cheaper experiments (checking multiple solutions). Models document decisions. Models help communication between different stakeholders.

16 Content Some background info What is a model? Types of modellers
UML and MDD (MDA) Modelling Maturity levels

17 From: Model-driven development: The good, the bad, and the ugly [1]
“…the MDD community can be divided into three parts… sketchers... blueprinters, and … model programmers….”

18 [1] The Sketchers use UML to facilitate the understanding of code… use the sketches to help communicate ideas and alternatives about what you are about to do. … You do not show every class, just those that are interesting…

19 [1] The Blueprinters ... create very detailed design models, handed off to coders to produce implementations... Sketchers and the blueprinters maintain a strong distinction between design models and code artefacts….

20 [1] The model programmers support the use of UML (or other notation) as a development language with executable semantics (e.g., action semantics or statecharts). The distinction between models and code is obscured…

21 Approaches to MDD Generative Approach to MDD Models are often used for code generation, followed by compilation and then execution. It keeps modelling and execution separate. Interpretative Approach to MDD Allows models to be directly executed (it relates to the interpretative programming language approach). UML has a tight mapping to a family of OO languages, e.g., code generation to C++ and Java are common.

22 Content Some background info What is a model? Types of modellers
UML and MDD (MDA) Modelling Maturity levels

23 UML 1.3 Is Not a Visual Programming Language?
“UML 1.3 is a visual modeling language. It does not have all necessary visual and semantic support to replace programming languages. But the introduction of Action Semantics into UML has changed this!” Not all agrees – State Charts already existed and could be used instead of Action Semantics. [2] Action Semantics UML Extensions let you express actions as UML objects. An action object may take a set of inputs and transform it into a set of outputs, or may change the state of the system, or both. Actions are assumed to occur independently - that is, there is infinite concurrency in the system, unless you chain them (i.e., action's outputs being another action's inputs) this fits distributed execution environments.

24 Executable UML Abstracting away programming languages.
Class diagrams shows structure. Statechart diagrams shows object lifecycle (control). Action language shows behavior (algorithm)

25 Interpretation of Program PSMm
Refinement [1]: “A relationship that represent a fuller specification of something that has already been specified at a certain level of detail or at a different semantic level.” Refinement Realization Chain conceptual towards a specific platform implementation running. impl. «refine» «refine» «refine» «compile» «load» PIM PIM/PSM PSM Imple- mentation Source Code Imple- mentation Target Code Loaded Impl. Target Code The elements of the realization chain can be seen as models that in some way can be interpreted – lets call them Programs, even if some elements only model structure (as opposed to behavior). Interpretation of Program PSMm (Role: req. --- spec. mellom modellene) Talk about: figures in general + “verifiable transformation of an abstract (high-level) formal specification into a concrete (low-level) executable program. Stepwise refinement allows this process to be done in stages. ” Data refinement is used to convert an abstract data model (in terms of sets for example) into implementable data structures (such as arrays).[citation needed] Operation refinement converts a specification of an operation on a system into an implementable program (e.g., a procedure). The postcondition can be strengthened and/or the precondition weakened in this process. The most abstract model, the Computational Independent Model (CIM), deals only with concepts of the application domain. PIM PSM1 PSMm Runtime Instances Runtime Instances VirtualMachine Processor

26 Model-Driven Architecture (MDA)
A software design approach for the development of software systems... a set of guidelines for the structuring of specifications, which are expressed as models. It was launched by the Object Management Group (OMG) in 2001.

27 [2]: The MDA Process PSM Bridge [3]: … separates specification of functionality from specification of implementation of that functionality on a specific platform..” [4]: First, you build a model with a high level of abstraction independent of any implementation technology. This is called a Platform Independent Model (PIM). Next, the PIM is transformed into one or more Platform Specific Models (PSMs). A PSM is tailored to specify your system in terms of the implementation constructs that are available in one specific implementation technology, e.g. a database model, an EJB model. The final step is to transform a PSM to code. Because a PSM fits its technology very closely, this transformation is rather trivial. The complex step is the one in which a PIM is transformed to a PSM. Code Bridge A generative approach…

28 MDA Example 1 Several Application
PIM Reverse engineer First transformation PSM Second transformation Implementation Platform Independent Model CORBA Model EJB Model XML/SOAP Model Other Models The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) that enables software components written in multiple computer languages and running on multiple computers to work together (i.e., it supports multiple platforms). CORBA Code EJB Code XML/SOAP Code Other Code

29 MDA Example 2 Three Tier Solution – One Application
PIM PSM Relational DB PSM EJB Comp. PSM Web PSM SQL Code PSM EJB Code PSM JSP Code

30 Content Some background info What is a model? Types of modellers
UML and MDD (MDA) Modelling Maturity levels

31 The use of model in software development
Model-based Engineering The use of model in software development requirements Requirement analysis design implementation verification deployment Validation Jos B. Warmer and Anneke Kleppe defined Modeling Maturity levels (MML) MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only Testing Deve-lopment Characteristics: Conflicting views between developers and users. Impossible to understand if the developers leave (they always do!). Many choices are made by the programmer in an ad-hoc fashion. Selo Sulistyo created this slide

32 MML 0 My software … Model-based Engineering No specification
MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only Model-based Engineering MML 0 requirements Requirement analysis design implementation verification deployment Validation No specification Testing Deve-lopment My software … Characteristics: Conflicting views between developers and users. Impossible to understand if the developers leave (they always do!). Many choices are made by the programmer in an ad-hoc fashion. Selo Sulistyo created this slide

33 MML 1 Model-based Engineering Selo Sulistyo created this slide
MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only Model-based Engineering MML 1 requirements Requirement analysis design implementation verification deployment Validation Testing Deve-lopment Specification of software is written down in one or more natural language documents. Characteristics: Natural language is ambiguous. Programmer takes business decisions. Impossible to keep up-to-date after changing the software. Selo Sulistyo created this slide

34 + MML 2 Model-based Engineering Selo Sulistyo created this slide
MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only Model-based Engineering MML 2 requirements Requirement analysis design implementation verification deployment Validation Specification of software in one or more natural language documents plus several high-level diagrams to explain the overall architecture. Testing Deve-lopment + Characteristics: Text is easier to grasp through the diagrams. Disadvantages of MML 1 are still present: Natural language is ambiguous. Programmer takes business decisions. Impossible to keep up-to-date. Selo Sulistyo created this slide

35 + MML 3 Model-based Engineering Selo Sulistyo created this slide
MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only Model-based Engineering MML 3 requirements Requirement analysis design implementation verification deployment Validation Specification of software is written down in one or more models. Additional natural language text is used to explain the background and motivation of the models. Testing Deve-lopment + Characteristics: Diagrams are true representation of the software. Transition to code is mostly manual. Update problem remains. Programmer still makes business decisions. Selo Sulistyo created this slide

36 MML 4 Model-based Engineering Selo Sulistyo created this slide
MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only Model-based Engineering MML 4 requirements Requirement analysis design implementation verification deployment Validation Specification of software is written down in one or more models. Natural language text is used to explain the background and motivation of the models. The models are precise enough to have a direct link with the actual code. Testing Deve-lopment Characteristics: Programmers do not make business decisions anymore. Keeping models and code up-to-date is easy. Direct move from model to code facilitates iterative & incremental development. Selo Sulistyo created this slide

37 MML 5 Model-based Engineering Selo Sulistyo created this slide
MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only Model-based Engineering MML 5 The models are precise and detailed enough to allow complete code-generation. The code is invisible (as assembler is today). Modeling language  High level programming language. requirements Requirement analysis design implementation verification deployment Validation Testing Development Use the figure to explain MML each level Characteristics: Programmers do not make business decisions anymore. The model is the code. The modeling language becomes a high level programming language. Selo Sulistyo created this slide

38 Modeling Maturity Levels (MML)
Model-based Engineering Modeling Maturity Levels (MML) MML 0: No Specification MML 1: Textual Specification MML 2: Text with Models MML 3: Models with Text MML 4: Precise Models MML 5: Models only MBE ! Selo Sulistyo created this slide 38

39 In theory, there is no difference between theory and practice.
But in practice, there is (Jan L. A. van de Snepscheut/Yogi Berra)

40 References [1] [2] Introduction to OMG's Unified Modeling Language™ (UML™) [accessed Aug. 2002] [3] OMG Editor: Model Driven Architecture (MDA) (ormsc/ ) Accessed 19 August 2002 [4] Addison-Wesley, MDA Explained: The Model Driven Architecture™: Practice and Promise Anneke Kleppe, Jos Warmer, Wim Bast (Klasse Objecten, Soest, the Netherlands [1] Douglas Hofstadter. I Am a Strange Loop (ISBN ) (2007)


Download ppt "A (Very) Short Introduction to Model-Driven Development (MDD)"

Similar presentations


Ads by Google